Integrand size = 33, antiderivative size = 221 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {a^2 \sqrt {c} \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x} \arctan \left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {915, 1829, 655, 201, 223, 209} \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {a^2 \sqrt {c} \sqrt {a+b x} \left (a^2 C+4 A b^2\right ) \sqrt {a c-b c x} \arctan \left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}}+\frac {1}{8} x \sqrt {a+b x} \left (\frac {a^2 C}{b^2}+4 A\right ) \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \left (a^2-b^2 x^2\right ) \sqrt {a c-b c x}}{3 b^2}-\frac {C x \sqrt {a+b x} \left (a^2-b^2 x^2\right ) \sqrt {a c-b c x}}{4 b^2} \]
[In]
[Out]
Rule 201
Rule 209
Rule 223
Rule 655
Rule 915
Rule 1829
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \sqrt {a^2 c-b^2 c x^2} \left (A+B x+C x^2\right ) \, dx}{\sqrt {a^2 c-b^2 c x^2}} \\ & = -\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}-\frac {\left (\sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \left (-c \left (4 A b^2+a^2 C\right )-4 b^2 B c x\right ) \sqrt {a^2 c-b^2 c x^2} \, dx}{4 b^2 c \sqrt {a^2 c-b^2 c x^2}} \\ & = -\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (\left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \sqrt {a^2 c-b^2 c x^2} \, dx}{4 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \int \frac {1}{\sqrt {a^2 c-b^2 c x^2}} \, dx}{8 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {\left (a^2 c \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x}\right ) \text {Subst}\left (\int \frac {1}{1+b^2 c x^2} \, dx,x,\frac {x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^2 \sqrt {a^2 c-b^2 c x^2}} \\ & = \frac {1}{8} \left (4 A+\frac {a^2 C}{b^2}\right ) x \sqrt {a+b x} \sqrt {a c-b c x}-\frac {B \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{3 b^2}-\frac {C x \sqrt {a+b x} \sqrt {a c-b c x} \left (a^2-b^2 x^2\right )}{4 b^2}+\frac {a^2 \sqrt {c} \left (4 A b^2+a^2 C\right ) \sqrt {a+b x} \sqrt {a c-b c x} \tan ^{-1}\left (\frac {b \sqrt {c} x}{\sqrt {a^2 c-b^2 c x^2}}\right )}{8 b^3 \sqrt {a^2 c-b^2 c x^2}} \\ \end{align*}
Time = 0.21 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.56 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {\sqrt {c (a-b x)} \left (b \sqrt {a-b x} \sqrt {a+b x} \left (-a^2 (8 B+3 C x)+2 b^2 x (6 A+x (4 B+3 C x))\right )+6 a^2 \left (4 A b^2+a^2 C\right ) \arctan \left (\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{24 b^3 \sqrt {a-b x}} \]
[In]
[Out]
Time = 1.66 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.74
method | result | size |
risch | \(\frac {\left (6 C \,b^{2} x^{3}+8 b^{2} B \,x^{2}+12 A \,b^{2} x -3 C \,a^{2} x -8 a^{2} B \right ) \sqrt {b x +a}\, \left (-b x +a \right ) c}{24 b^{2} \sqrt {-c \left (b x -a \right )}}+\frac {a^{2} \left (4 b^{2} A +C \,a^{2}\right ) \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {-b^{2} c \,x^{2}+a^{2} c}}\right ) \sqrt {-\left (b x +a \right ) c \left (b x -a \right )}\, c}{8 b^{2} \sqrt {b^{2} c}\, \sqrt {b x +a}\, \sqrt {-c \left (b x -a \right )}}\) | \(163\) |
default | \(\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, \left (6 C \,b^{2} x^{3} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+12 A \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{2} b^{2} c +8 B \,b^{2} x^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}+3 C \arctan \left (\frac {\sqrt {b^{2} c}\, x}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}\right ) a^{4} c +12 A \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} x -3 C \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, a^{2} x -8 B \,a^{2} \sqrt {b^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\right )}{24 \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, b^{2} \sqrt {b^{2} c}}\) | \(269\) |
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.20 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\left [\frac {3 \, {\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt {-c} \log \left (2 \, b^{2} c x^{2} + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {-c} x - a^{2} c\right ) + 2 \, {\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \, {\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{48 \, b^{3}}, -\frac {3 \, {\left (C a^{4} + 4 \, A a^{2} b^{2}\right )} \sqrt {c} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} b \sqrt {c} x}{b^{2} c x^{2} - a^{2} c}\right ) - {\left (6 \, C b^{3} x^{3} + 8 \, B b^{3} x^{2} - 8 \, B a^{2} b - 3 \, {\left (C a^{2} b - 4 \, A b^{3}\right )} x\right )} \sqrt {-b c x + a c} \sqrt {b x + a}}{24 \, b^{3}}\right ] \]
[In]
[Out]
\[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\int \sqrt {- c \left (- a + b x\right )} \sqrt {a + b x} \left (A + B x + C x^{2}\right )\, dx \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.63 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {C a^{4} \sqrt {c} \arcsin \left (\frac {b x}{a}\right )}{8 \, b^{3}} + \frac {A a^{2} \sqrt {c} \arcsin \left (\frac {b x}{a}\right )}{2 \, b} + \frac {1}{2} \, \sqrt {-b^{2} c x^{2} + a^{2} c} A x + \frac {\sqrt {-b^{2} c x^{2} + a^{2} c} C a^{2} x}{8 \, b^{2}} - \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {3}{2}} C x}{4 \, b^{2} c} - \frac {{\left (-b^{2} c x^{2} + a^{2} c\right )}^{\frac {3}{2}} B}{3 \, b^{2} c} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 527 vs. \(2 (191) = 382\).
Time = 0.43 (sec) , antiderivative size = 527, normalized size of antiderivative = 2.38 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=-\frac {24 \, {\left (\frac {2 \, a c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} A a b^{2} - 12 \, {\left (\frac {2 \, a^{2} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (b x - 2 \, a\right )}\right )} B a b - 12 \, {\left (\frac {2 \, a^{2} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a} {\left (b x - 2 \, a\right )}\right )} A b^{2} + 4 \, {\left (\frac {6 \, a^{3} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left ({\left (2 \, b x - 5 \, a\right )} {\left (b x + a\right )} + 9 \, a^{2}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} C a + 4 \, {\left (\frac {6 \, a^{3} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left ({\left (2 \, b x - 5 \, a\right )} {\left (b x + a\right )} + 9 \, a^{2}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} B b - {\left (\frac {18 \, a^{4} c \log \left ({\left | -\sqrt {b x + a} \sqrt {-c} + \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \right |}\right )}{\sqrt {-c}} - {\left (39 \, a^{3} - {\left (2 \, {\left (3 \, b x - 10 \, a\right )} {\left (b x + a\right )} + 43 \, a^{2}\right )} {\left (b x + a\right )}\right )} \sqrt {-{\left (b x + a\right )} c + 2 \, a c} \sqrt {b x + a}\right )} C}{24 \, b^{3}} \]
[In]
[Out]
Time = 19.44 (sec) , antiderivative size = 876, normalized size of antiderivative = 3.96 \[ \int \sqrt {a+b x} \sqrt {a c-b c x} \left (A+B x+C x^2\right ) \, dx=\frac {\frac {C\,a^4\,c^8\,\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}{2\,\left (\sqrt {a+b\,x}-\sqrt {a}\right )}-\frac {C\,a^4\,c\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{15}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{15}}-\frac {35\,C\,a^4\,c^7\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^3}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^3}+\frac {273\,C\,a^4\,c^6\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^5}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^5}-\frac {715\,C\,a^4\,c^5\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^7}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^7}+\frac {715\,C\,a^4\,c^4\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^9}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^9}-\frac {273\,C\,a^4\,c^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{11}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{11}}+\frac {35\,C\,a^4\,c^2\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{13}}{2\,{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{13}}}{b^3\,c^8+\frac {b^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{16}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{16}}+\frac {8\,b^3\,c^7\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^2}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^2}+\frac {28\,b^3\,c^6\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^4}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^4}+\frac {56\,b^3\,c^5\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^6}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^6}+\frac {70\,b^3\,c^4\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^8}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^8}+\frac {56\,b^3\,c^3\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{10}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{10}}+\frac {28\,b^3\,c^2\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{12}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{12}}+\frac {8\,b^3\,c\,{\left (\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}\right )}^{14}}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^{14}}}+\frac {A\,x\,\sqrt {a\,c-b\,c\,x}\,\sqrt {a+b\,x}}{2}-\frac {B\,\left (a^2-b^2\,x^2\right )\,\sqrt {a\,c-b\,c\,x}\,\sqrt {a+b\,x}}{3\,b^2}-\frac {C\,a^4\,\sqrt {c}\,\mathrm {atan}\left (\frac {\sqrt {a\,c-b\,c\,x}-\sqrt {a\,c}}{\sqrt {c}\,\left (\sqrt {a+b\,x}-\sqrt {a}\right )}\right )}{2\,b^3}-\frac {A\,a^2\,\sqrt {b}\,c^2\,\ln \left (\sqrt {-b\,c}\,\sqrt {c\,\left (a-b\,x\right )}\,\sqrt {a+b\,x}-b^{3/2}\,c\,x\right )}{2\,{\left (-b\,c\right )}^{3/2}} \]
[In]
[Out]